﻿using System;
using System.Collections;
using System.Collections.Generic;
using Vote;

namespace Data
{
    public class Data
    {
        public static List<List<int>>  IDQ = new List<List<int>>();
        public static List<Question> Questions = new List<Question>();
        public static List<User> Users = new List<User>();


        public static void Add()
        {
            List<int> questions1 = new List<int>();
            questions1.Add(100000);
            User user = new User("123456", "123456", "zhan");
            Users.Add(user);
            
            QuestionOption questionOption11 = new QuestionOption(questions1[0]+1, "2");
            questions1.Add(questions1[0] + 1);
            QuestionOption questionOption12 = new QuestionOption(questions1[1] + 1, "3");
            questions1.Add(questions1[1] + 1);
            QuestionOption questionOption13 = new QuestionOption(questions1[2] + 1, "4");
            questions1.Add(questions1[2] + 1);
            QuestionOption questionOption14 = new QuestionOption(questions1[3] + 1, "5");
            questions1.Add(questions1[3] + 1);

            IDQ.Add(questions1);
            List<QuestionOption> QuestionOptions = new List<QuestionOption>() { questionOption11, questionOption12, questionOption13, questionOption14 };

            string Question1Content = "1+1=？"; 
            Question question = new Question(IDQ[0][0],Question1Content, Convert.ToDateTime("2018-08-01 10:57:31"), QuestionOptions);
            Questions.Add(question);

            List<int> questions2 = new List<int>();
            questions2.Add(100100);
            QuestionOption questionOption21 = new QuestionOption(questions2[0] + 1, "2");
            questions2.Add(questions2[0] + 1);
            QuestionOption questionOption22 = new QuestionOption(questions2[1] + 1, "3");
            questions2.Add(questions2[1] + 1);
            QuestionOption questionOption23 = new QuestionOption(questions2[2] + 1, "4");
            questions2.Add(questions2[2] + 1);
            QuestionOption questionOption24 = new QuestionOption(questions2[3] + 1, "5");
            questions2.Add(questions2[3] + 1);

            IDQ.Add(questions2);
            List<QuestionOption> Question2Options = new List<QuestionOption>() { questionOption21, questionOption22, questionOption23, questionOption24 };

            string Question2Content = "2+2=？";
            Question question2 = new Question(IDQ[1][0], Question2Content, Convert.ToDateTime("2018-08-01 10:57:31"), QuestionOptions);
            Questions.Add(question2);


        }
    }

}

